#include <stdio.h>
#include <stdlib.h>
int main()
{ 
    int random = 0;
    int guess = 0;
    random = rand()%(100+1);
    while(1)
    {
        printf("请猜数字:");
        scanf("%d",&guess);
        if(guess > random)
        {
            printf("猜大了\n");
        }
        else if(guess < random)
        {
            printf("猜小了\n");
        }
        else
        {
            printf("猜对了\n");
            break;
        }
    }
    return 0;
} 